package map_reduce_filter

// 多对一
func Reduce(arr []string, fn func(s string) int) int {
	sum:=0
	for _, it := range arr {
		sum+=fn(it)
	}
	return sum
}